package cn.cloudplug.instar_ec.main.synergia;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.view.ViewPager;
import android.support.v7.widget.AppCompatSpinner;
import android.view.View;

import com.amap.api.maps.MapView;

import butterknife.BindView;
import cn.cloudplug.instar_ec.R;
import cn.cloudplug.instar_ec.R2;
import cn.cloudplug.instar_ec.main.base.StatusBarDelegate;

/**
 * Created by pc on 2018/2/1.
 */

public class SynergiaDelegate extends StatusBarDelegate {
    @BindView(R2.id.vp_card)
    ViewPager cardViewPager;
    @BindView(R2.id.mapView)
    MapView mapView;
    @BindView(R2.id.spinner_group)
    AppCompatSpinner groupSpinner;

    @Override
    protected Object setLayout() {
        return R.layout.delegate_synergia;
    }

    @Override
    protected void onBindView(Bundle savedInstanceState, View view) {

    }

    @Override
    public void onActivityCreated(@Nullable Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);
        if(mapView!=null){
            mapView.onCreate(savedInstanceState);
        }
    }

    @Override
    public void onResume() {
        super.onResume();
        if(mapView!=null)mapView.onResume();
    }

    @Override
    public void onPause() {
        super.onPause();
        if(mapView!=null)mapView.onPause();
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        if(mapView!=null)mapView.onDestroy();
    }

    @Override
    public void onSaveInstanceState(Bundle outState) {
        super.onSaveInstanceState(outState);
        if(mapView!=null)mapView.onSaveInstanceState(outState);
    }
}
